package com.emergency.assist.domain;

import com.emergency.base.domain.BaseEntity;

import javax.persistence.*;
import java.util.List;

/**
 * 需要规划的路线类
 */

@Entity
@Table(name = "bus_route")
public class Route extends BaseEntity {

    //路线标志
    private String tag;
    //起点 （lng，lat）
    private String origin;
    //终点 （lng，lat）
    private String destination;
    //通过时间 单位：秒
    private Long duration;
    //道路是否通畅
    private int isOpen;
    //距离 单位：米
    private Double distance;
    //权重总和
    @Transient
    private Double weight;
    /**
     * 道路策略
     * 0：默认
     * 3：不走高速
     * 4：高速优先
     * 5：躲避拥堵
     * 6：少收费
     * 7：躲避拥堵&高速优先
     * 8：躲避拥堵&不走高速
     * 9：躲避拥堵&少收费
     * 10：躲避拥堵&不走高速&少收费
     * 11：不走高速&少收费
     */
    private int tactics;
    //道路收费 单位：元
    private int toll;

    /**
     * 临时属性
     */
    @Transient
    private List<RoutePoint> routePoints;

    public Route() {
        super();
    }

    public Route(Long id) {
        super(id);
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    public int getToll() {
        return toll;
    }

    public void setToll(int toll) {
        this.toll = toll;
    }

    public int getTactics() {
        return tactics;
    }

    public void setTactics(int tactics) {
        this.tactics = tactics;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public int getIsOpen() {
        return isOpen;
    }

    public void setIsOpen(int isOpen) {
        this.isOpen = isOpen;
    }

    public List<RoutePoint> getRoutePoints() {
        return routePoints;
    }

    public void setRoutePoints(List<RoutePoint> routePoints) {
        this.routePoints = routePoints;
    }
}